import { request } from '../request';

/** get list */
export function commentList(params: Api.SystemManage.CommentSearchParams) {
  return request<Api.SystemManage.CommentList>({
    url: '/comment/list',
    method: 'post',
    data: params
  });
}

/** save */
export function commentSave(params?: Api.SystemManage.CommentSaveParams) {
  return request<boolean>({
    url: '/comment/add',
    method: 'post',
    data: params
  });
}

/** update */
export function commentUpdate(params?: Api.SystemManage.CommentUpdateParams) {
  return request<boolean>({
    url: '/comment/update',
    method: 'post',
    data: params
  });
}

/** get */
export function commentGet(params: { id: string }) {
  return request<Api.SystemManage.Comment>({
    url: '/comment/get',
    method: 'post',
    data: params
  });
}

/** del */
export function commentDel(params: { id: string }) {
  return request<boolean>({
    url: '/comment/del',
    method: 'post',
    data: params
  });
}

/** delBatch */
export function commentDelBatch(params: { ids: Array<string> }) {
  return request<boolean>({
    url: '/comment/delBatch',
    method: 'post',
    data: params
  });
}
